﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using CarsWebApplication.businesslogic.constants;


namespace CarsWebApplication.businesslogic.entities
{
    /// <summary>
    /// Summary description for Model
    /// </summary>
    public class Model
    {
        private int id;
        private string name;

        public Model(string commaSeperatedValue)
        {
            string[] modelInfo = commaSeperatedValue.Split(CarWebAppConstants.COMMA);
            Int32.TryParse(modelInfo[0], out id);
            this.name = modelInfo[1];
        }

        public Model(int id, string name)
        {
            this.id = id;
            this.name = name;
        }

        public int Id
        {
            get { return id; }
            set { id = value; }
        }
        public string Name
        {
            get { return name; }
            set { name = value; }
        }

    }
}
